package cn.uniqueinfo.dp.service.impl;

import cn.uniqueinfo.dp.mapper.RoleMenuMapper;
import cn.uniqueinfo.dp.service.IRoleMenuService;
import cn.uniqueinfo.dp.service.base.BaseServiceImpl;
import cn.uniqueinfo.dp.vo.RoleMenuVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author:朱元勋
 * @mail:395910063@qq.com
 * @date:2019-02-13 11:51:24
 * @description: 角色菜单对应表
 */
@Service
public class RoleMenuServiceImpl extends BaseServiceImpl<RoleMenuVO> implements IRoleMenuService {
    private RoleMenuMapper mapper;

    public RoleMenuServiceImpl(RoleMenuMapper mapper) {
        this.mapper = mapper;
        this.baseMapper = mapper;
    }

    @Override
    public Integer deleteByRoleId(Long roleId) {
        return this.mapper.deleteByRoleId(roleId);
    }

    @Override
    public List<RoleMenuVO> findByRoleId(Long roleId) {
        return this.mapper.findByRoleId(roleId);
    }
}
